package com.example.spingbootvue.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.example.spingbootvue.mapper.employeemessageMapper;
import com.example.spingbootvue.entity.employeemessage;

import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/HrContorl")
public class HRController {

    @Autowired
    employeemessageMapper employeemessageMapper;

    //HR查询所有发布的招聘信息
    @GetMapping("/querybyhraccount")
    public List<employeemessage> selectAll(@RequestParam String account) {
        return employeemessageMapper.findByaccount(account);
    }

    //HR在发布历史界面点击删除即可删除发布记录
    @DeleteMapping("/DeleteById/{id}")
    public int deleteById(@PathVariable Integer id) {
        return employeemessageMapper.deletebyid(id);
    }

}
